import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/deptInfoManage/bladeDeptInfo/getPage',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/deptInfoManage/bladeDeptInfo/delete',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/deptInfoManage/bladeDeptInfo/save',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/deptInfoManage/bladeDeptInfo/update',
    method: 'post',
    data: row
  })
}

export const getDeptInfo = (id) => {
  return request({
    url: '/api/deptInfoManage/bladeDeptInfo/getDetail',
    method: 'get',
    params: {
      id
    }
  })
}

export const getCurrentDeptInfo = () => {
  return request({
    url: '/api/deptInfoManage/bladeDeptInfo/getCurrentDetail',
    method: 'get'
  })
}

export const submit = (form) => {
  return request({
    url: '/api/deptInfoManage/bladeDeptInfo/submit',
    method: 'post',
    data: form
  })
}

export const getPictures = (flag) => {
  return request({
    url: '/api/deptInfoManage/bladeDeptInfo/getPictureList',
    method: 'get',
    params: {
      flag
    }
  })
}
